home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Format 1994 October
/
Macformat17.cdr
/
Shareware City
/
Developers
/
GAL ƒ
/
GAL examples
/
shift
< prev
next >
Wrap
Text File
|
1994-07-11
|
370b
|
22 lines
;GEM has no shift but you can can make one
; just use rotate
begin_code
copy #127=>reg0 ; 7 ones
copy #16=>reg2 ; will shift it 16 bits (and disappear)
looptop
jump:subroutine shift
subtract #1=>reg2
compare #0=>reg2
jump:less looptop
halt
noop
shift
rotate reg0
and mask=>reg0 ;1111...0
return
end_code
begin_data
mask constant -2
end_data
end